#ifndef ADMINMANAGER_H
#define ADMINMANAGER_H
#include <QWidget>
#include "../MainProject/sqlitedatabase.h"
#include <QSqlError>
#include <QSqlQuery>
#include <QDebug>
#include "../MainProject/loggermanager.h"
#include "../MainProject/common.h"
#include "QTabWidget"
#include <QTableWidgetItem>
namespace Ui {
class AdminManager;
}

class AdminManager : public QWidget
{
    Q_OBJECT

public:
    explicit AdminManager(QWidget *parent = nullptr);
    void selectAllUsers(QJsonArray result);
    ~AdminManager();

private slots:
    void on_addButton_clicked();

    void on_EditButton_clicked();

    void on_deleteButton_clicked();

    void on_queryButton_clicked();
    void onCheckboxStateChanged(QTableWidgetItem *item);



public slots:
    void ReceiveLogininformation(QString &userName,QString &role);

private:
    Ui::AdminManager *ui;
    QString userName;
    QString phone;
    QString email;
    QString role;
    Common common;
};

#endif // ADMINMANAGER_H
